package com.lening.communitylog.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.communitylog.dto.LogDto;
import com.lening.communitylog.pojo.Log;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lening.communitylog.vo.LogVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 操作日志表 Mapper 接口
 * </p>
 *
 * @author 秦旭
 * @since 2024-06-04
 */
public interface LogMapper extends BaseMapper<Log> {

    /*创建表*/
    int createTable(String date);

    /*获取表信息*/
    Page<LogVo> page(LogDto logDto);

    /*删除表*/
    int deleteTable(String tableName);

    /*获取表条数*/
    long getTotalCounts(@Param("tableNames") List<String> tableNames);

    int addLog(@Param("logVo") LogVo logVo,@Param("tableName") String tableName);

    List<String> getTableName();
}
